package com.atguigu.mock.entity;

import com.atguigu.common.base.entity.AutoIdBase;
import com.atguigu.common.comment.Comment;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import javax.persistence.Entity;
import javax.persistence.ManyToOne;
import java.time.LocalDateTime;

@Entity
@Getter
@Setter
@NoArgsConstructor
@Comment(value = "审核记录表")
public class CreditFacilityStatus extends AutoIdBase {

    @Comment("批复结果 1.通过 2.未通过")
    private int actionTaken;

    @Comment("关联授信记录")
    @ManyToOne()
    private CreditFacility creditFacility;

    @Comment("相关责任人")
    @ManyToOne
    private Employee employee;

    @Comment("加签人")
    @ManyToOne
    private Employee signatory;

    @Comment("变更后状态：1.新建 2.未达到风控 3.待分配 4.已分配信审经办 5.信审经办审核通过 6.信审经办审核复议 7.业务反馈已提交 8.一级评审通过 9.一级评审复议 10.二级评审通过 11.二级评审复议 12.项目评审会审核通过 13.项目评审会复议 14.总经理/分管总审核通过 15.总经理/分管总审核复议 16.出具批复审核通过 17.出具批复审核复议 18 不满批复金额 19.新增授信 20.拒绝 21.取消")
    private int status;

    public CreditFacilityStatus(LocalDateTime createTime, int actionTaken, CreditFacility creditFacility, Employee employee, int status) {
        super(createTime);
        this.actionTaken = actionTaken;
        this.creditFacility = creditFacility;
        this.employee = employee;
        this.status = status;
    }
}
